Skip to content

Conversation

@akosthekiss
Copy link
Member

Should core, ext, libm, and/or port libraries be properly installed
on some system, help compilation and linking against them by
providing standard .pc files, which can be picked up by
pkg-config.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu

@akosthekiss akosthekiss added the tools Related to the tooling scripts label Jan 7, 2019
@akosthekiss
Copy link
Member Author

Some background:

Readworthy links:

JerryScript built with jerry-libm

$ tools/build.py --clean --install=build/install --jerry-libm=on
$ export PKG_CONFIG_PATH=<<JERRYSCRIPT_ROOT>>/build/install/lib/pkgconfig
$ pkg-config libjerry-core --cflags
-I<<JERRYSCRIPT_ROOT>>/build/install/include -I<<JERRYSCRIPT_ROOT>>/build/install/include/jerry-libm
$ pkg-config libjerry-core --libs
-L<<JERRYSCRIPT_ROOT>>/build/install/lib -ljerry-core
$ pkg-config libjerry-core --libs --static
-L<<JERRYSCRIPT_ROOT>>/build/install/lib -ljerry-core -ljerry-libm
$ pkg-config libjerry-ext --cflags
-I<<JERRYSCRIPT_ROOT>>/build/install/include -I<<JERRYSCRIPT_ROOT>>/build/install/include/jerry-libm
$ pkg-config libjerry-ext --libs
-L<<JERRYSCRIPT_ROOT>>/build/install/lib -ljerry-ext
$ pkg-config libjerry-ext --libs --static
-L<<JERRYSCRIPT_ROOT>>/build/install/lib -ljerry-ext -ljerry-core -ljerry-libm

JerryScript built with system libm

$ tools/build.py --clean --install=build/install --jerry-libm=off --link-lib=m
$ pkg-config libjerry-core --cflags
-I<<JERRYSCRIPT_ROOT>>/build/install/include
$ pkg-config libjerry-core --libs
-L<<JERRYSCRIPT_ROOT>>/build/install/lib -ljerry-core
$ pkg-config libjerry-core --libs --static
-L<<JERRYSCRIPT_ROOT>>/build/install/lib -ljerry-core -lm
$ pkg-config libjerry-ext --cflags
-I<<JERRYSCRIPT_ROOT>>/build/install/include
$ pkg-config libjerry-ext --libs
-L<<JERRYSCRIPT_ROOT>>/build/install/lib -ljerry-ext
$ pkg-config libjerry-ext --libs --static
-L<<JERRYSCRIPT_ROOT>>/build/install/lib -ljerry-ext -ljerry-core -lm

Some extras:

$ pkg-config libjerry-core libjerry-port-default --libs --static
-L<<JERRYSCRIPT_ROOT>>/build/install/lib -ljerry-core -lm -ljerry-port-default

Should core, ext, libm, and/or port libraries be properly installed
on some system, help compilation and linking against them by
providing standard `.pc` files, which can be picked up by
pkg-config.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
@akosthekiss
Copy link
Member Author

PR updated (after the landing of #2684 ).

Copy link
Contributor

@LaszloLango LaszloLango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@rerobika rerobika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (informal)

Copy link
Contributor

@robertsipka robertsipka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@robertsipka robertsipka merged commit 77767c2 into jerryscript-project:master Jan 21, 2019
@akosthekiss akosthekiss deleted the pkgconfig branch January 21, 2019 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools Related to the tooling scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants